<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); ?>
<?
	if (sizeof($basket) > 0) {
		?>
		<table cellspacing='0' cellpadding='0' class='basket_table'>
			<tr>
				<th>#</th>
				<th>Название</th>
				<th>Количество</th>
				<th>Цена</th>
				<th>Сумма</th>
			</tr>
		<?
		$i = 0;
		foreach ($basket as $key => $item) {
			$image = $this->db->select()->from('catalog_images')->where('photo_item', $key)->where('photo_main', '1')->get()->row_array();
			$i++;
			echo "<tr>";
				echo "<td style='width: 30px;'>";
					echo $i;
				echo "</td>";
				echo "<td>";
					echo "<div><a href='/catalog/".$key."/' target='_blank' ".(sizeof($image) > 0?"rel='".$key.":".$image['photo_file']."'":"")." class='can_preview_item'>".$item['name']."</a></div>";
				echo "</td>";
				echo "<td style='text-align: center; width: 60px;'>";
					echo $item['count'];
				echo "</td>";
				echo "<td style='width: 100px;'>";
					echo tonum($item['price'])." руб.";
				echo "</td>";
				echo "<td style='width: 100px;'>";
					echo tonum($item['sum']);
				echo "</td>";
			echo "</tr>";

		}
		echo "</table>";
	} else {
		showmenotice('Пустой заказ!!!');
	}
?>